-- GENERATED SPELL FOR [Clutchmother Zavas] --


function spell0_6582(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6582', 660, 1)
end

function spell1_6582(pUnit, Event) --@Gorishi Egg,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(14205,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_6582', 1, 1)
end

function spell2_6582(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(12097,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6582', 20301, 1)
end

function Sorts_6582(pUnit, Event)
local choix_sorts_6582 = math.random(0, 2)
if choix_sorts_6582 == 0 then
pUnit:RegisterEvent('spell0_6582', 1, 1)
end
if choix_sorts_6582 == 1 then
pUnit:RegisterEvent('spell1_6582', 1, 1)
end
if choix_sorts_6582 == 2 then
pUnit:RegisterEvent('spell2_6582', 1, 1)
end
end

function mob6582_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6582', math.random(1500, 3000), 1)
end

function mob6582_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6582_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6582_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6582, 1, 'mob6582_Action')
RegisterUnitEvent(6582, 2, 'mob6582_Leave')
RegisterUnitEvent(6582, 3, 'mob6582_Kill')
RegisterUnitEvent(6582, 4, 'mob6582_Die')
